home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / Mous / TN.MOUS.004 < prev    next >
Encoding:
Text File  |  1988-12-15  |  2.9 KB  |  61 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Mouse
  8. #4:    Mouse Firmware Bug Affecting ServeMouse
  9.  
  10. Revised by:    Matt Deatherage                                  November 1988
  11. Revised by:    Rilla Reynolds                                    January 1985
  12.  
  13. This Technical Note documents a bug in the mouse firmware on the AppleMouse 
  14. card which affects the way ServeMouse works.
  15. _____________________________________________________________________________
  16.  
  17. There is a bug in the AppleMouse II 6805 firmware which may affect the way 
  18. ServeMouse works in an application.  If the application takes more than one 
  19. video cycle (normally about 16 ms) to respond to a mouse-generated interrupt, 
  20. then ServeMouse will not claim the interrupt.  The 6805 returns an interrupt 
  21. status byte of $00 (i.e., no mouse interrupt pending), and the 6502 firmware 
  22. sets the carry bit (although the interrupt is also cleared by the ServeMouse 
  23. call).  This situation can be confusing, and under ProDOS or Pascal it can be 
  24. lethal.  We have identified the following solutions, any of which should work:
  25.  
  26. If you are not working under an established operating system (i.e., ProDOS or 
  27. Pascal):
  28.  
  29. 1.    Do not allow unclaimed interrupts to be fatal to your application.  
  30.       Ignore them.
  31. 2.    Always service mouse interrupts within 1/60 of a second.  If you 
  32.       are forced to disable interrupts for a longer period, first use 
  33.       SetMouse to set the mouse mode to 0, then call ServeMouse to clear 
  34.       any existing mouse interrupt.  After interrupts are re-enabled, 
  35.       restore the mouse mode.
  36.  
  37. If you are working under an established operating system (i.e., ProDOS or 
  38. Pascal) for which unclaimed interrupts are fatal and the mouse is not the 
  39. only interrupting device:
  40.  
  41. 1.    Write the mouse interrupt handler to claim all unclaimed 
  42.       interrupts and make sure the mouse interrupt handler is installed 
  43.       last, otherwise the interrupt will never get through to any 
  44.       interrupt handlers which follow that of the mouse.
  45.  
  46. Note:    This solution may cause cursor flicker by delaying the 
  47. application's response to VBL interrupts.
  48.  
  49. 2.    Write a spurious interrupt handler (also known as a "daemon"), not 
  50.       associated with any device, which claims all unclaimed interrupts 
  51.       (i.e., clears the carry bit then exits).  For the reason just 
  52.       mentioned, this interrupt handler must be installed last.
  53.  
  54. Note:    Under ProDOS, this limits the number if interrupting devices 
  55. to three.
  56.  
  57. This bug exists in the AppleMouse card, therefore you must deal with it when 
  58. you are writing eight-bit programs for the Apple ][+, IIe, IIc and IIGS which 
  59. use the mouse.  The Apple IIGS does not have this bug in its internal mouse 
  60. firmware, so sixteen-bit "native" mode programs are not affected by it.
  61.